<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p7_绝对定位</title>
    <style>
        .fu {
            background-color: yellow;
            width: 500px;
            /*相对定位：子类如果加了绝对路径，那么我们在父类的地方加一个相对路径，这样子类的绝地路径的参照物就以父类的这个为参照物*/
            position: relative;
        }
        .fu > div {
            width: 100px;
            height: 100px;
        }
        .z1 {
            background-color: red;
        }
        .z2 {
            background-color: blue;
            /*绝对定位*/
            position: absolute;
            top: 0;
            right: 0;
        }
        .z3 {
            background-color: green;
        }
    </style>
</head>
<body>
  <div class="fu">
    <div class="z1"></div>
    <div class="z2"></div>
    <div class="z3"></div>
  </div>
</body>
</html>